
#ifndef _BUTTON_H       // Prevent multiple definitions if this 
#define _BUTTON_H       // file is included in more than one place
#define WIN32_LEAN_AND_MEAN

#include "image.h"
#include "input.h"
#include "audio.h"

namespace buttonNS
{
	const int WIDTH = 50;                   // image width
	const int HEIGHT = 50;                  // image height
	const int X = GAME_WIDTH/2 - WIDTH/2;   // location on screen
	const int Y = GAME_HEIGHT/2 - HEIGHT/2;
	const int   START_FRAME = 0;       
	const int   END_FRAME = 2;         
}

class Button : public Image
{
public:
	// Constructor
	Button();
	// Destructor
	virtual ~Button();

	virtual bool initialize(Graphics *g, Input *i, Audio *a, int width, int height, int ncols,
							TextureManager *textureM);

	virtual bool isHovered();
	virtual bool isClicked();

	virtual void update(float frameTime);

	virtual void setImageOverlay(Image overay);
	virtual void removeImageOverlay() {hasImageOverlay = false;}

	virtual void draw(COLOR_ARGB color = graphicsNS::WHITE);

	virtual void setX(float x);
	virtual void setY(float y);
	

protected:
	Input   *input;         
	Audio   *audio;      
	Image	imageOverlay;
	bool	hasImageOverlay;
	
};

#endif